<script setup>
	defineProps({
		title: {
			type: String,
			default: '默认标题',
		},
		moreText: {
			type: String,
			default: '',
		},
	})
</script>

<template>
	<div class="detail-section">
		<div class="header">
			<h2 class="title">{{ title }}</h2>
		</div>
		<div class="content">
			<slot name="content">
				<h3>默认内容</h3>
			</slot>
		</div>
		<div
			class="footer"
			v-if="moreText.length">
			<span class="more"> {{ moreText }} </span>
			<van-icon name="arrow" />
		</div>
	</div>
</template>

<style lang="scss" scoped>
	.detail-section {
		padding: 0 16px;
		margin-top: 50px;
		border-top: 5px solid #f3f3f3;
		.header {
			height: 50px;
			line-height: 50px;
			border-bottom: 1px solid #f3f3f3;
			margin-bottom: 10px;
			.title {
				font-size: 25px;
			}
		}
		.footer {
			display: flex;
			justify-content: end;
			align-items: center;
			height: 44px;
			font-size: 16px;
			color: #f7a381;
		}
	}
</style>
